import request from '@/utils/request'

export const regionApi = {
  // 获取省份列表
  getProvinces() {
    return request({
      url: '/api/region/provinces',
      method: 'GET'
    })
  },

  // 获取城市列表
  getCities(provinceId) {
    return request({
      url: `/api/region/cities/${provinceId}`,
      method: 'GET'
    })
  },

  // 获取区县列表
  getDistricts(cityId) {
    return request({
      url: `/api/region/districts/${cityId}`,
      method: 'GET'
    })
  }
}

export default regionApi 